home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- // Sculpt Paint Tool UI script
- //
- global proc puttyValues(string $toolName)
- {
- string $parent = (`toolPropertyWindow -q -location` + "|putty");
- setParent $parent;
-
- string $helpTag = "SculptSurfacesTool";
- toolPropertySetCommon $toolName "putty.xpm" $helpTag;
-
- string $currentTab = `tabLayout -query -selectTab puttyTabs_L`;
- jasperValues( "puttyCtx", $toolName, $currentTab );
-
- toolPropertySelect putty;
- }
-
- global proc jasperSculptValues(
- string $jasperCommand,
- string $toolName,
- string $currentTool,
- int $force
- )
- {
- string $cmd;
- global int $jasperSculptActive;
-
- // print ("jasperSculptValues( " + $force + ") active = "
- // + $jasperSculptActive + "\n");
-
- if ( ! $force && $jasperSculptActive ) return;
- $jasperSculptActive = 1;
-
-
- //
- // Stamp Profile frameLayout
- //
- jasperStampProfileValues( $jasperCommand, $toolName,
- $currentTool, $force
- );
-
-
- //
- // Sculpt Operation frameLayout
- //
- string $cmd = ($jasperCommand + " -q -mtm " + $toolName);
- string $operation = `eval $cmd`;
- if ( $operation == "push" ) {
- radioButtonGrp -e -sl 1 mouseTipRadio;
- } else if ( $operation == "pull" ) {
- radioButtonGrp -e -sl 2 mouseTipRadio;
- } else if ( $operation == "smooth" ) {
- radioButtonGrp -e -sl 3 mouseTipRadio;
- } else if ( $operation == "erase" ) {
- radioButtonGrp -e -sl 4 mouseTipRadio;
- }
-
-
- //
- // Auto Smooth frameLayout
- //
- $cmd = ($jasperCommand + " -q -autosmooth " + $toolName);
- checkBoxGrp -e -v1 `eval $cmd` autoSmooth;
-
- $cmd = ($jasperCommand + " -q -smoothiters " + $toolName);
- intSliderGrp -e -v `eval $cmd` smoothStrength;
-
-
- //
- // Sculpt Variables frameLayout
- //
- $cmd = ($jasperCommand + " -q -refvector " + $toolName);
- string $refvector = `eval $cmd`;
- if ( $refvector == "normal" ) {
- radioButtonGrp -e -sl 1 rv0Radio;
- } else if ( $refvector == "firstnormal" ) {
- radioButtonGrp -e -sl 2 rv0Radio;
- } else if ( $refvector == "view" ) {
- radioButtonGrp -e -sl 3 rv0Radio;
- } else if ( $refvector == "xaxis" ) {
- radioButtonGrp -e -sl 1 rv1Radio;
- } else if ( $refvector == "yaxis" ) {
- radioButtonGrp -e -sl 2 rv1Radio;
- } else if ( $refvector == "zaxis" ) {
- radioButtonGrp -e -sl 3 rv1Radio;
- } else if ( $refvector == "visoparm" ) {
- radioButtonGrp -e -sl 1 rv2Radio;
- } else if ( $refvector == "uisoparm" ) {
- radioButtonGrp -e -sl 2 rv2Radio;
- }
- updateUVSculptDirection( $jasperCommand );
-
- $cmd = ($jasperCommand + " -q -maxdisp " + $toolName);
- floatSliderGrp -e -v `eval $cmd` maxDisp;
- text -e -l `currentUnit -q -l` maxDispUnits;
-
-
- //
- // Surface frameLayout
- //
- $cmd = ($jasperCommand + " -q -refsurface " + $toolName);
- checkBox -e -v `eval $cmd` refSurfaceChk;
-
- $cmd = ($jasperCommand + " -q -erasesrfupd " + $toolName);
- checkBox -e -v `eval $cmd` eraseSurfaceChk;
- }
-